package scau.erps.service.impl;

import java.util.List;

import org.nutz.dao.Cnd;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.service.IdEntityService;

import scau.erps.entity.Comprehensivefee;
import scau.erps.service.ComprehensivefeeService;

/**
 * 报表——综合费用实现类
 * @author FYJ
 *
 */
public class ComprehensivefeeServiceImpl extends IdEntityService<Comprehensivefee> implements ComprehensivefeeService{
	@Override
	public void updateComprehensivefee(Comprehensivefee comprehensivefee) {
		this.dao().update(comprehensivefee);
		
	}

	@Override
	public List<Comprehensivefee> getComprehensivefee(int teamid,String year) {
		SqlExpressionGroup e1 = null;
		SqlExpressionGroup e2 = null;
		if(teamid != 0){
			e1 = Cnd.exps("teamid", "=", teamid);			
		}
		if(year !=null){
			e2 = Cnd.exps("year", "=", year);			
		}
		return this.query(Cnd.where(e1).and(e2), null);		
	}
}
